package com.hellobike.haxing.modules.shop.service;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.IService;
import com.hellobike.haxing.common.vo.Result;
import com.hellobike.haxing.modules.shop.entity.ShopWithdrew;

import java.util.List;
import java.util.Map;

/**
 * @Description: 提现申请
 * @Author: haxing-boot
 * @Date: 2020-02-08
 * @Version: V1.0
 */
public interface IShopWithdrewService extends IService<ShopWithdrew> {
    /**
     * 批量审核通过
     *
     * @param ids
     */
    Result<?> approveBatch(List<Long> ids, String auditUser);

    /**
     * 审核通过
     *
     * @param id
     * @param auditUser
     */
    Result<?> approve(Long id, String auditUser);

    /**
     * 审核拒绝,拒绝需退款
     */
    Result<?> reject(ShopWithdrew shopWithdrew) throws Exception;

    /**
     * 批量打款
     *
     * @param ids
     * @param loanUser
     */
    void loanBatch(List<Long> ids, String loanUser);

    /**
     * 打款
     *
     * @param id
     * @param loanUser
     */
    Result<?> loan(Long id, String loanUser);

    /**
     * 删除
     *
     * @param id
     */
    void delete(Long id, Integer userId);

    /**
     * 批量删除
     *
     * @param ids
     */
    void deleteBatch(List<Long> ids, Integer userId);

    /**
     * 运营批量审核通过
     *
     * @param ids
     */
    void yyapproveBatch(List<Long> ids, String auditUser);

    /**
     * 运营审核通过
     *
     * @param id
     * @param auditUser
     */
    void yyapprove(Long id, String auditUser);

    /**
     * 运营提现审核查询
     *
     * @param shopWithdrew
     * @param page
     * @param parameterMap
     * @return
     */
    IPage<ShopWithdrew> queryYyPage(ShopWithdrew shopWithdrew, Page<ShopWithdrew> page, Map<String, String[]> parameterMap);

    /**
     * 定时查询打款中的状态结果
     */
    void updateSettleQuery();

    Result yyreject(ShopWithdrew shopWithdrew, Long id, String username);
}
